<!--
 * @Author: byron
 * @Date: 2022-01-06 00:12:14
 * @LastEditTime: 2022-02-14 01:12:23
-->
<template>
    <div class="main-warp">
        <div
            class="st-card main-content"
            v-for="(item, index) in imagelist"
            :key="index"
        >
            <div class="item-card-warp">
                <div class="background"></div>
                <div class="background-mask"></div>
                <div class="item-card">
                    <div class="image-warp">
                        <img
                            src="http://image.huos77.cn/img-note/image-20220327115625157.png"
                            alt=""
                        />
                    </div>
                    <div class="right-con">
                        <div class="tag">
                            <span>每日一题</span>
                        </div>
                        <div class="time">2022-01-06 23:19</div>
                        <div class="content">坚持就是胜利</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="button-warp">
            <button class="button btn-more">加载更多</button>
        </div>
        <!-- 图片展示部分结束 -->

        <!-- 打卡日历开始 -->
        <div class="calendar-warp">
            <div class="calendar-main"></div>
        </div>
        <!-- 打卡日历结束 -->
    </div>
</template>

<script>
export default {
    props: {},
    data() {
        return {
            msg: '刷题记录',
            flag: 1,
            imagelist: [1, 2, 3, 4, 5],
        }
    },
    watch: {},
    computed: {},
    methods: {
        // 图片放大方法
        EnlargeImg() {
            this.$parent.flag = 1
        },
    },
    mounted() {
        this.$emit('updateHandle')
    },
}
</script>
<style lang="less" scoped>
@keyframes clockin-fade {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
.st-card {
    position: relative;
    z-index: 0;
    .item-card-warp {
        position: relative;
        padding: 10px;
        margin-bottom: 20px;
        background: transparent;
        overflow: hidden;
        border-radius: 4px;
        .background {
            position: absolute;
            top: 0;
            right: 0;
            left: 0;
            bottom: 0;
            z-index: 1;
            background-image: url('http://image.huos77.cn/img/bg.jpg');
            background-size: 100%;
            background-position: top left;
            filter: blur(4px);
        }
        .background-mask {
            position: absolute;
            left: 0;
            bottom: 0;
            top: 0;
            right: 0;
            z-index: 2;
            background-color: rgba(0, 0, 0, 0.2);
        }
        .item-card {
            position: relative;
            display: flex;
            padding: 2px;
            z-index: 3;

            .image-warp {
                width: 269px;
                height: 150px;
                margin-right: 10px;
                border-radius: 4px;
                overflow: hidden;
            }
            .right-con {
                padding-top: 10px;
                .tag {
                    display: inline-block;
                    max-width: 100px;
                    min-width: 80px;
                    opacity: 0;
                    border: 1px solid #c6673c;
                    padding: 4px;
                    color: #c6673c;
                    border-radius: 4px;
                    text-align: center;
                    margin-bottom: 16px;
                    animation: clockin-fade 0.6s ease-out 1 forwards;
                }
                .time {
                    opacity: 0;
                    color: rgba(255, 255, 255, 0.5);
                    margin-bottom: 8px;
                    animation: clockin-fade 0.6s ease-out 1 0.2s forwards;
                }
                .content {
                    opacity: 0;
                    color: #fff;
                    animation: clockin-fade 0.6s ease-out 1 0.4s forwards;
                }
            }
        }
    }
}

.button-warp {
    display: flex;
    justify-content: center;
    .btn-more {
        border-radius: 4px;
        width: 120px;
        height: 40px;
    }
}
</style>
